package org.lemon.cla.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.lemon.cla.enums.FeedbackTypeEnum;
import org.lemon.cla.enums.FeedbackStatusEnum;

import java.time.LocalDateTime;

@Data
@TableName("feedback")
@Schema(description = "应用反馈实体")
public class Feedback {

    @TableId(value = "feedback_id", type = IdType.AUTO)
    @Schema(description = "反馈ID", example = "1")
    private Long feedbackId;

    @TableField("user_id")
    @Schema(description = "用户ID (外键，关联用户表)", example = "101")
    private Long userId;

    @TableField("feedback_type")
    @Schema(description = "反馈类型", example = "建议", allowableValues = {"错误", "建议", "投诉", "其他"})
    private FeedbackTypeEnum feedbackType;

    @Schema(description = "反馈内容", example = "希望增加XX功能。")
    private String content;

    @Schema(description = "联系方式", example = "13800138000")
    private String contact;

    @TableField("create_time")
    @Schema(description = "创建时间", example = "2024-06-25T10:00:00")
    private LocalDateTime createTime;

    @Schema(description = "处理状态", example = "待处理", allowableValues = {"待处理", "处理中", "已解决", "已关闭"})
    private FeedbackStatusEnum status;

    @Schema(description = "管理员回复", example = "您的建议已收到，感谢！")
    private String reply;

    @TableField("reply_time")
    @Schema(description = "回复时间", example = "2024-06-26T15:00:00")
    private LocalDateTime replyTime;
}